<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="/system/layui/src/css/layui.css" media="all" />
    <link rel="stylesheet" href="/system/css/addMessage.css" media="all" />
</head>
<body>
<div id="queryMessage" class="all"></div>
<script type="text/javascript" src="/system/layui/src/layui.js"></script>
<script type="text/javascript" src="/system/js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="/security/sysUser/addMessage.js"></script>
<script type="text/javascript">
    function agreeMessage(userId){
        layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
        // 实际使用时的提交信息
        $.ajax({
            url:"/friend/agreeMessage",
            type:"post",
            async: false,
            data:{
                id:userId
            },
            success:function(res){
                layer.msg(res);
                setTimeout(function(){
                    layer.close(index);
                    layer.closeAll("iframe");
                },1000);
            },
            error:function(res){
                layer.msg(res);
            }
        });
        return false;
    }
    function disagreeMessage(userId){
        layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
        // 实际使用时的提交信息
        $.ajax({
            url:"/friend/disagreeMessage",
            type:"post",
            async: false,
            data:{
                id:userId
            },
            success:function(res){
                layer.msg(res);
                setTimeout(function(){
                    layer.close(index);
                    layer.closeAll("iframe");
                },1000);
            },
            error:function(res){
                layer.msg(res);
            }
        });
        return false;
    }
</script>
</body>
</html>
